package com.szpx.entity.yang;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Table;
import java.security.Timestamp;

@Data
@Table(name = "products")
public class YangDao {


    @Column(name = "product_id")
    private int productId;

       @Column(name = "product_name")
        private String productName;

        private String category;
        private String brand;
        private double price;

    @Column(name = "stock_quantity")
        private int stockQuantity;

    @Column(name = "created_at")
        private Timestamp createdAt;

        public int getProductId() {
            return productId;
        }

        public void setProductId(int productId) {
            this.productId = productId;
        }

        public String getProductName() {
            return productName;
        }

        public void setProductName(String productName) {
            this.productName = productName;
        }

        public String getCategory() {
            return category;
        }

        public void setCategory(String category) {
            this.category = category;
        }

        public String getBrand() {
            return brand;
        }

        public void setBrand(String brand) {
            this.brand = brand;
        }

        public double getPrice() {
            return price;
        }

        public void setPrice(double price) {
            this.price = price;
        }

        public int getStockQuantity() {
            return stockQuantity;
        }

        public void setStockQuantity(int stockQuantity) {
            this.stockQuantity = stockQuantity;
        }

        public Timestamp getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(Timestamp createdAt) {
            this.createdAt = createdAt;
        }


    @Override
        public String toString() {
            return "Product{" +
                    "productId=" + productId +
                    ", productName='" + productName + '\'' +
                    ", category='" + category + '\'' +
                    ", brand='" + brand + '\'' +
                    ", price=" + price +
                    ", stockQuantity=" + stockQuantity +
                    ", createdAt=" + createdAt +
                    '}';
        }
    }


